翻訳と辞書
Words near each other
・ Cayman Islands at the 2011 World Championships in Athletics
・ Cayman Islands at the 2012 Summer Olympics
・ Cayman Islands at the 2012 Winter Youth Olympics
・ Cayman Islands at the 2013 World Championships in Athletics
・ Cayman Islands at the 2014 Commonwealth Games
・ Cayman Islands at the 2014 Summer Youth Olympics
・ Cayman Islands at the 2014 Winter Olympics
・ Caye Chapel
・ Caye Chapel Airport
・ Caye Quintana
・ Cayenne
・ Cayenne (disambiguation)
・ Cayenne (Dutch colony)
・ Cayenne (instrumental)
・ Cayenne (mascot)
Cayenne (programming language)
・ Cayenne Battery
・ Cayenne caecilian
・ Cayenne jay
・ Cayenne keyhole limpet
・ Cayenne Klein
・ Cayenne nightjar
・ Cayenne pepper
・ Cayenne River
・ Cayenne slender-legged tree frog
・ Cayenne stubfoot toad
・ Cayenne – Félix Eboué Airport
・ Cayennia
・ Cayes-Jacmel
・ Cayetana


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Cayenne (programming language) : ウィキペディア英語版
Cayenne (programming language)
Cayenne is a functional programming language with dependent types.
The basic types are functions, products, and sums. Functions and products use dependent types to gain additional power.
There are very few building blocks in the language, but much syntactic sugar to make it more readable. The syntax is largely borrowed from Haskell.
There is no special module system, because with dependent types records (products) are powerful enough to define modules.
The main aim with Cayenne is not to use the types to express specifications (although this can be done), but rather to use the type system to give type to more functions. An example of a function that can be given a type in Cayenne is printf.

PrintfType :: String -> #
PrintfType (Nil) = String
PrintfType ('%':('d':cs)) = Int -> PrintfType cs
PrintfType ('%':('s':cs)) = String -> PrintfType cs
PrintfType ('%':( _ :cs)) = PrintfType cs
PrintfType ( _ :cs) = PrintfType cs
aux :: (fmt::String) -> String -> PrintfType fmt
aux (Nil) out = out
aux ('%':('d':cs)) out = \ (i::Int) -> aux cs (out ++ show i)
aux ('%':('s':cs)) out = \ (s::String) -> aux cs (out ++ s)
aux ('%':( c :cs)) out = aux cs (out ++ c : Nil)
aux (c:cs) out = aux cs (out ++ c : Nil)
printf :: (fmt::String) -> PrintfType fmt
printf fmt = aux fmt Nil

The Cayenne implementation is written in Haskell, and it also translates to Haskell.
== External links ==

* (A description ).


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Cayenne (programming language)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.